#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;
//void Swap(int& left, int& right)
//{
//	int temp = left;
//	left = right;
//	right = temp;
//}
//void Swap(double& left, double& right)
//{
//	double temp = left;
//	left = right;
//	right = temp;
//}
//void Swap(char& left, char& right)
//{
//	char temp = left;
//	left = right;
//	right = temp;
//}


template<typename T>
void Swap(T& x1, T& x2)
{
	T tmp = x1;
	x1 = x2;
	x2 = tmp;
}


int main()
{
	int a=0, b=1;
	double c = 1.1, d = 2.2;
	Swap(a, b);
	Swap(c, d);

	
	return 0;
}

//int main()
//{
//	char* p1 = new char[1024 * 1024*1024];
//	cout << p1 << endl;
//	return 0;
//}